/**
 * @author MIAO
 * Created on 2011-10-20
 * For more information, please visit:ismiao.com
 */
package com.ismiao.designPattern.Prototype;

public class ClientWithSingleton {
	public static void main(String[] args) {
		PrototypeManager pm = PrototypeManager.getPrototypeManager();
		String className = "com.ismiao.designPattern.Prototype.PrototypeImp";
		Prototype prototype = (Prototype) pm.getPrototype(className);
		prototype.setProperty("this is the prototype");
		
		Prototype p1 = (Prototype)prototype.clone();
		System.out.println("the first son: "+p1.getProperty());
		Prototype p2 = (Prototype)prototype.clone();
		System.out.println("the second son: "+p2.getProperty());
	}

}
